// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
// import axios from 'axios'
import {postRequest, postKeyValueRequest, putRequest, deleteRequest, getRequest} from './utils/api'
import {
  Button,
  Input,
  Table,
  TableColumn,
  Dialog,
  Card,
  Container,
  Icon,
  Select,
  Form,
  Tag,
  Tree,
  Pagination,
  Badge,
  Loading,
  // Message,
  MessageBox,
  Menu,
  Tabs,
  TabPane,
  Breadcrumb,
  BreadcrumbItem,
  Dropdown,
  Steps,
  Step,
  Tooltip,
  Popover,
  Collapse,
  FormItem,
  Checkbox,
  Header,
  DropdownMenu,
  DropdownItem,
  Aside,
  Main,
  MenuItem,
  Submenu,
  Option,
  Col,
  Row,
  Upload,
  Radio,
  TimePicker,
  DatePicker,
  RadioGroup,
  CheckboxGroup,
  CollapseItem,
  Switch
} from 'element-ui'
// 引入element-ui的样式文件
import 'element-ui/lib/theme-chalk/index.css'
import 'font-awesome/css/font-awesome.min.css'

Vue.prototype.$ELEMENT = {size: 'small', zIndex: 3000}
Vue.use(Switch)
Vue.use(CollapseItem)
Vue.use(Radio)
Vue.use(TimePicker)
Vue.use(RadioGroup)
Vue.use(CheckboxGroup)
Vue.use(DatePicker)
Vue.use(Upload)
Vue.use(Row)
Vue.use(Col)
// Vue.use(Message)
Vue.use(Option)
Vue.use(Submenu)
Vue.use(MenuItem)
Vue.use(Header)
Vue.use(DropdownMenu)
Vue.use(DropdownItem)
Vue.use(Aside)
Vue.use(Main)
Vue.use(Checkbox)
Vue.use(FormItem)
Vue.use(Collapse)
Vue.use(Popover)
Vue.use(Menu)
Vue.use(Tabs)
Vue.use(TabPane)
Vue.use(Breadcrumb)
Vue.use(BreadcrumbItem)
Vue.use(Dropdown)
Vue.use(Steps)
Vue.use(Step)
Vue.use(Tooltip)
Vue.use(Tree)
Vue.use(Pagination)
Vue.use(Badge)
Vue.use(Loading)
Vue.use(Button)
Vue.use(Input)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Dialog)
Vue.use(Card)
Vue.use(Container)
Vue.use(Icon)
Vue.use(Select)
Vue.use(Form)
Vue.use(Tag)
Vue.prototype.$alert = MessageBox.alert
Vue.prototype.$confirm = MessageBox.confirm

// import echarts from 'echarts'

// 通过这个命令使所有的element-ui标签(<el-*></el-*>)可被解析
Vue.prototype.postRequest = postRequest
Vue.prototype.postKeyValueRequest = postKeyValueRequest
Vue.prototype.putRequest = putRequest
Vue.prototype.deleteRequest = deleteRequest
Vue.prototype.getRequest = getRequest
// eslint-disable-next-line no-irregular-whitespace,全局引用axios,echarts
// Vue.prototype.$axios = axios
// Vue.prototype.$echarts = echarts
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
